package com.xl.observer.jre;

public class Client {

    public static void main(String[] args) {
        WeatherSubject weatherSubject = new WeatherSubject();

        WeatherObserver wo1 = new WeatherObserver();
        wo1.setObserverName("11111111");

        WeatherObserver wo2 = new WeatherObserver();
        wo2.setObserverName("22222222");

        weatherSubject.addObserver(wo1);
        weatherSubject.addObserver(wo2);

        weatherSubject.setContent("多云转阵雨");

    }
}
